using B.S.BaseData.Api.Read.Command.Hosp;
using B.S.BaseData.ErrorCode;
using B.S.BataBase.Domain.AI;
using B.S.BataBase.Domain.Hosp;
using MediatR;
using Microsoft.AspNetCore.Mvc;

namespace B.S.BaseData.Api.Read.Controllers
{
    /// <summary>
    /// 医院管理
    /// </summary>
    [ApiController]
    [Route("api/[controller]")]
    public class SmartCityController : ControllerBase
    {
        private readonly IMediator _mediator;

        public SmartCityController(IMediator mediator)
        {
            _mediator = mediator;
        }

        /// <summary>
        /// 获取轮播图列表
        /// </summary>
        [HttpGet("GetCarouselImageList")]
        public async Task<APIResult<ApiPaging<CarouselImage>>> GetCarouselImageList([FromQuery] CarouselImageShowCommand command)
        {
            return await _mediator.Send(command);
        }

        /// <summary>
        /// 获取医院列表
        /// </summary>
        [HttpGet("GetHospitalList")]
        public async Task<APIResult<ApiPaging<Hospital>>> GetHospitalList([FromQuery] HospitalShowCommand command)
        {
            return await _mediator.Send(command);
        }

        /// <summary>
        /// 获取科室列表
        /// </summary>
        [HttpGet("GetDepartmentList")]
        public async Task<APIResult<ApiPaging<Department>>> GetDepartmentList([FromQuery] DepartmentShowCommand command)
        {
            return await _mediator.Send(command);
        }
    }
} 